using System;
using System.Security.Cryptography;
using System.IO;
using Microsoft.Practices.EnterpriseLibrary.Security;

namespace NET.Library.Security.Cryptography
{
    /// <summary>
    /// 
    /// </summary>
    public class MD5
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Data"></param>
        /// <returns></returns>
        public static byte[] Encrypt(byte[] Data)
        {
            MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
            //try
            //{
                ISecurityCacheProvider cache;
                cache = SecurityCacheFactory.GetSecurityCacheProvider("Caching Store Provider");
                byte[] result = md5.ComputeHash(Data);
                return result;
            //}
            //finally
            //{
            //    md5 = null();
            //}
        }


    }
}
